package com.yinhe.music.yhmusic.search.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yinhe.music.yhmusic.R;

import java.util.List;

/**
 *
 * @author hasee
 * @date 2017/8/15
 */

public class SearchAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public SearchAdapter(int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
    }

    public SearchAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper,String item) {
        helper.setText(R.id.search_history_text,item)
                .addOnClickListener(R.id.delete_history_image);
    }
}
